package com.lagou.service.impl;

import com.lagou.service.ApiService;
import org.apache.dubbo.config.annotation.Service;

import java.util.Random;
import java.util.concurrent.TimeUnit;

@Service
public class ApiServiceImpl implements ApiService {

    @Override
    public String methodA(String name) {
        try {
            Thread.sleep((long) (Math.random() * 100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "methodA执行了，name=" + name;
    }

    @Override
    public String methodB(String name) {
        try {
            Thread.sleep((long) (Math.random() * 100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "methodB执行了，name=" + name;
    }

    @Override
    public String methodC(String name) {
        try {
            Thread.sleep((long) (Math.random() * 100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "methodC执行了，name=" + name;
    }
}
